package com.qingcheng.dao;

import com.qingcheng.pojo.goods.CategoryBrandCompose;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

public interface CategoryBrandComposeMapper extends Mapper<CategoryBrandCompose> {


    @Select("select ca.name categoryName,br.* \n"   +
            "from tb_category ca,tb_category_brand cb,tb_brand br \n" +
            "where ca.id in (select category_id from tb_category_brand \n"  +
            ") and br.id in (\n"  +
            " select brand_id from tb_category_brand where category_id in ( \n" +
            " select category_id from tb_category_brand\n" +
            ")\n" +
            ")")
    public CategoryBrandCompose findCategoryAndBrand();
}
